package net.csdra.libraryborrowing.service.user;

import net.csdra.libraryborrowing.domain.user.User;
import net.csdra.libraryborrowing.domain.user.UserRepository;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Component;

import java.nio.file.AccessDeniedException;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by msf on 2017/10/11.
 */
public interface CurrentUserInfo<T extends User> {

    public T set(T t);

    public T get() throws AccessDeniedException;


}
